sharedfp/sm and lockedfile: fix naming bug #5609
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
If an application opens a file from multiple processes
using MPI_COMM_SELF (or another set of communicators that have
the same CID on distinct process groups, as can happen as the result
of comm_split), the naming chosen for the managing the shared file pointer position
in a file (in sharedfp/lockedfile) or the mmapped shared memory region
(in sharedfp/sm) component would lead to a collision between the distinct process groups.
This patch ensures that the filename is different by integrating the process id
of rank 0 for each sub-communicator.
This fixes one aspect of the problem reported in github issue #5593
This commit is the equivalent to commit 9b65ec9 on master.
It can not be cherry-picked directly due to significant changes in the overal
organization of the file.
Signed-off-by: Edgar Gabriel [email protected]